<div class="heading">
  <div class="buttons"><a class="button" onclick="location='<?php echo base_url();?>admin/managepartner/add'"><span class="button_left button_insert"></span>
  <span class="button_middle">Thêm</span><span class="button_right"></span></a><a class="button" onclick="$('form').submit();"><span class="button_left button_delete"></span><span class="button_middle">Xoá</span><span class="button_right"></span></a></div>
</div>
<form action="managepartner/delete_partner" method="post" enctype="multipart/form-data" id="form">
  <table class="list">
    <thead style="height: 34px;font-weight: bold;">
      <tr>
        <td width="1" align="center"><input type="checkbox" onclick="$('input[name*=\'selected\']').attr('checked', this.checked);"></td>
        <td class="left">ID</td>
        <td class="left">Tên đối tác</td>
        <td class="left">Ảnh logo</td>
        <td class="left">Liên kết</td>
        <td class="right">Action</td>
      </tr>
    </thead>
    <tbody>
      <?php 
      if (@$partners) { 
        $class = 'odd';
        foreach ($partners as $p) { 
        $class = ($class == 'even' ? 'odd' : 'even'); 
      ?>
          <tr class="<?php echo $class; ?>">
            <td align="center">
                <input type="checkbox" value="<?=$p->id;?>" name="selected[]">
            </td>
            <td class="left" align="center"><?=$p->id?></td>
            <td class="left" align="center"><b><?=$p->name?></b></td>     
             <td class="left" align="center"><? if(file_exists('uploads/partner/'.$p->thumb)){?><img src="<?=base_url().'uploads/partner/'.$p->thumb;?>" width="150" height="100" /><?php }?></td>
              <td class="left" align="center"><?php echo '<a href="'.$p->link.'" target="_blank">'.$p->link.'</a>' ?></td>
            <td class="right" align="center">
              [ <a href="<?=site_url('admin/managepartner/update/'.$p->id)?>">Sửa</a> ] [ <a href="<?=site_url('admin/managepartner/delete/'.$p->id)?>" onclick="return confirm('Bạn có chắc muốn xóa?');">xóa</a> ]
            </td>
          </tr>
      <?php 
        }
      }
      ?>
    </tbody>
  </table>
  <p class="pagination" align="center"><?php echo @$paginator;?></p>
</form>